package com.tencent.sr.iris.activity.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 *
 */
@AllArgsConstructor
@Getter
public enum EventHandingRecordStatusEnum {
    HANDLING((byte) 0, "处理中"),
    SUCCEES((byte) 1, "处理成功"),
    FAIL((byte) 2, "处理失败"),
    ;

    private final byte code;
    private final String desc;

    public static EventHandingRecordStatusEnum getByCode(byte code) {
        for (EventHandingRecordStatusEnum staff : EventHandingRecordStatusEnum.values()) {
            if (staff.getCode() == code) {
                return staff;
            }
        }
        return null;
    }
}
